# $Id: PKGBUILD 166516 2012-09-09 13:16:50Z foutrelis $
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: tobias <tobias funnychar archlinux.org>

pkgbase=gtk-xfce-engine
pkgname=('gtk2-xfce-engine' 'gtk3-xfce-engine')
pkgver=3.0.1
pkgrel=1
arch=('i686' 'x86_64')
url="http://www.xfce.org/"
license=('GPL2')
groups=('xfce4')
makedepends=('gtk2' 'gtk3')
options=('!libtool')
source=(http://archive.xfce.org/src/xfce/$pkgbase/3.0/$pkgbase-$pkgver.tar.bz2)
sha256sums=('eb03cf81da1a91e426a2141c092ed7a1634cab29ea2f3546480e901290a7a06d')

build() {
  cd "$srcdir/$pkgbase-$pkgver"

  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --libexecdir=/usr/lib \
    --localstatedir=/var \
    --disable-static \
    --disable-debug
  make
}

package_gtk2-xfce-engine() {
  pkgdesc="Xfce Gtk+-2.0 engine"
  depends=('gtk2')
  provides=("gtk-xfce-engine=$pkgver-$pkgrel")
  conflicts=('gtk-xfce-engine')
  replaces=('gtk-xfce-engine')

  cd "$srcdir/$pkgbase-$pkgver"
  make DESTDIR="$pkgdir" install

  # Remove gtk3 engine and themes
  find "$pkgdir" -name gtk-3.0 -exec rm -r {} +
}

package_gtk3-xfce-engine() {
  pkgdesc="Xfce Gtk+-3.0 engine"
  depends=('gtk3')
  conflicts=('gtk-xfce-engine<=2.99.0-1')

  cd "$srcdir/$pkgbase-$pkgver"
  make DESTDIR="$pkgdir" install

  # Remove gtk2 engine and themes
  find "$pkgdir" -name gtk-2.0 -exec rm -r {} +
}

# vim:set ts=2 sw=2 et:
